This part of the tutorial uses an embedded style sheet for a change. Observe that the div.menu uses the :hover pseudo class to change the style of a link when the mouse "hovers" over it.
The display property is used to determine how to display the chosen element. This element may be a block or an inline element. It may also be none, in which case the element is not displayed. In this case, the style sheet sets the display to none for all anchor (a) elements in the div.menu. The div.menu:hover forces the display to block when the mouse is over the a elements. Please notice the subtle but very important difference between div.menu:hover a, which causes the entire block to display when the mouse is over it and div.menu a:hover, which causes the background color of each a element to override the block color when the mouse is over it! Tyr all of this in your browser to understand it.
User Style Sheets let the user override the styles chosen by the web developer. This feature of CSS is really useful for anyone who does not like to read small fonts like this. BUT, user style sheets do not alwsys work the way you want, so let's try again
User Style Sheets let the user override the styles chosen by the web developer. This feature of CSS is really useful for anyone who does not like to read small fonts like this. OK, that's better.
Here is the explanation: When the font-size is specified absolutely, as with "8pt", the author style has higher precedence than the user style. But when the font-size is specified relatively, as with "0.8em", the author style does not override the user style, and the font size is relative to the font-size specified in the user style sheet.
Please click here to go to the tutorial on JavaScript